package com.xuecheng.learning.service;

import com.xuecheng.base.model.PageResult;
import com.xuecheng.learning.model.dto.MyCourseTableParams;
import com.xuecheng.learning.model.dto.XcChooseCourseDto;
import com.xuecheng.learning.model.dto.XcCourseTablesDto;
import com.xuecheng.learning.model.po.XcCourseTables;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * @author cyf
 * @version 1.0
 * @description # 我的课程表service接口
 * @date 2024/11/15 16:02
 */

public interface MyCourseTablesService {
    /**
     * @description 添加选课
     * @param userId 用户id
     * @param courseId 课程id
     * @return com.xuecheng.learning.model.dto.XcChooseCourseDto
     * @author cyf
     * @date 2024/11/24 17:33
     */
     XcChooseCourseDto addChooseCourse(String userId, Long courseId);

    /**
     * @description 判断学习资格
     * @param userId
     * @param courseId
     * @return XcCourseTablesDto 学习资格状态 [{"code":"702001","desc":"正常学习"},{"code":"702002","desc":"没有选课或选课后没有支付"},{"code":"702003","desc":"已过期需要申请续期或重新支付"}]
     * @author cyf
     * @date 2024/11/24 17:37
     */
     XcCourseTablesDto getLearningStatus(String userId, Long courseId);

    /**
     * 查询我的课表
     * @param params 分页参数
     * @return PageResult<XcCourseTables>
     */
     PageResult<XcCourseTables> mycoursetable(MyCourseTableParams params);

    /**
     * 保存选课记录支付状态
     * @param choosecourseId 选课id
     * @return 保存结果
     */
    boolean saveChooseCourseStauts(String choosecourseId);

}
